<%=u.name%> sent a 
<%=ch.amount%> WinPoints challenge 
     <%=link_to "See Details","#",:clicktoshowdialog=>"accept_dialog_" + ch.id.to_s%> 
   <%fb_dialog "accept_dialog_" + ch.id.to_s,1 do %>
    <%=fb_dialog_title "Challenge Details"%>
    <%fb_dialog_content do%>
       <form id="my_form">
       <table>
       <tr><td class='dialog-text'>From:</td><td><%=ch.sender.name%></td></tr>
       <tr><td class='dialog-text'>Match:</td><td><%=ch.match.home_team.displayed_name + " ("+ point_spread(ch.match,ch.match.home_team) + " )" + " vs.<br/>" + ch.match.away_team.displayed_name + " ("+ point_spread(ch.match,ch.match.away_team) + " )" if ch.match%></td></tr>
       <tr><td class='dialog-text'>His/her bet:</td><td><%=ch.sender.bet(ch.match).team.displayed_name%></td></tr>
       <tr><td class='dialog-text'>Your bet:</td><td><%=current_user.bet(ch.match).team.displayed_name%></td></tr>
       <tr><td class='dialog-text'>Amount:</td><td> <%=ch.amount%> WinPoints </td></tr>
       <tr><td class='dialog-text'>Message:</td><td> 
         <%=ch.message%>
       </td></tr>
       </table>
       </form>
    <%end%>
     <fb:dialog-button type="submit" value="Accept challenge" clickrewriteurl="http://<%=@call_back_url%>/friends_bet/accept?chid=<%=ch.id%>" clickrewriteid="<%="accept_dialog_" + ch.id.to_s%>" clickrewriteform="my_form" />
  <%end%>

